<script setup>
  import Add from './components/Add.vue';
  import Sub from './components/Sub.vue';
  import { useStockStore } from './stores/stock';
  const stockStore = useStockStore()
</script>

<template>
  <h1>根组件</h1>
  <span>库存总数: </span><input type="text"/>
  <span>库存翻倍数: {{ stockStore.doubleStock }}</span>
  <hr />
  <Add />
  <hr />
  <Sub />
</template>

<style>
  #app {
    width: 350px;
    margin: 100px auto;
    padding: 10px 10px;
    border: 1px solid #ccc;
  }
</style>
